package com.lincong.controller.superadmin;

import com.lincong.entity.bo.ShopCategory;
import com.lincong.entity.dto.Result;
import com.lincong.service.solo.ShopCategoryService;
import org.simpleframework.core.annotation.Controller;
import org.simpleframework.inject.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author linchong
 * @version 1.0
 * @Date: 2022-05-11 14:03
 * @Description: ShopCategoryOperationController$
 */
@Controller
public class ShopCategoryOperationController {

	@Autowired
	private ShopCategoryService shopCategoryService;

	public Result<Boolean> addShopCategory(HttpServletRequest req, HttpServletResponse resp){
		//todo:参数校验以及请求参数转化
		return shopCategoryService.addShopCategory(new ShopCategory());
	}

	public Result<Boolean> removeShopCategoryId(HttpServletRequest req, HttpServletResponse resp){
		//todo:参数校验以及请求参数转化
		return shopCategoryService.removeShopCategoryId(1);
	}

	public Result<Boolean> modifyShopCategory(HttpServletRequest req, HttpServletResponse resp){
		//todo:参数校验以及请求参数转化
		return shopCategoryService.modifyShopCategory(new ShopCategory());
	}

	public Result<ShopCategory> queryShopCategoryById(HttpServletRequest req, HttpServletResponse resp){
		//todo:参数校验以及请求参数转化
		return shopCategoryService.queryShopCategoryById(1);
	}

	public Result<List<ShopCategory>> queryShopCategory(HttpServletRequest req, HttpServletResponse resp){
		//todo:参数校验以及请求参数转化
		return shopCategoryService.queryShopCategory(new ShopCategory(),1,100);
	}
}
